<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>轮播图</title>
	<style>
		*{
			padding: 0;
			margin:0;
			font-size: 14px;
			box-sizing: border-box;
		}
		img{vertical-align: top;}
		.container{
			width: 200px;
			height: 300px;
			margin: 50px auto 0;
			border: 3px solid #ccc;
			overflow: hidden;
			position: relative;
		}
		.imgList{
			position: relative;
			width: 100%;
			height: 100%;
		}
		.imgList > img{
			position: absolute;
			left: 0;
			right: 0;
			display: none;
		}
		.order{
			position: absolute;
			left: 0;
			top: 0;
			width: 100%;
			text-align: center;
			color: white;
			z-index: 1;
			padding-top: 10px;
		}
		.desc{
			position: absolute;
			left: 0;
			bottom:  0;
			width: 100%;
			text-align: center;
			color: black;
			z-index: 1;
			font-size: 18px;
			font-weight: bold;
			padding-bottom: 10px;
		}
		.pre , .next{
			width: 50px;
			line-height: 50px;
			position: absolute;
			top:50%;
			color: #fff;
			font-size: 30px;
			font-weight: bold;
			text-align: center;
			cursor:pointer;
			-moz-user-select:none;
		}
		.pre{
			left: 0;
		}
		.next{
			right: 0;
		}
		
	</style>
</head>
<body>
	<div class="container">
		<div class="order">加载中...</div>
		<div class="imgList">
			<img src="images/1.jpg" alt="大老婆">
			<img src="images/2.jpg" alt="二老婆">
			<img src="images/3.jpg" alt="三老婆">
			<img src="images/4.jpg" alt="小老婆">
		</div>	
		<div class="pre"  onselectstart="return false;"><<</div>
		<div class="next"  onselectstart="return false;">>></div>
		<div class="desc">加载中...</div>
	</div>

	<script>
		// 动态加载js，提升性能
		loadScript("js.js");
		
		function loadScript(url,callback){
			var script = document.createElement('script');
			script.type = "text/javascript";
			script.src = url;
			document.querySelector("head").appendChild(script);
		}
	</script>
</body>
</html>